package com.xqt.inters.service.sys;

import com.xqt.entity.sys.SysRole;
import com.xqt.entity.sys.SysRoleMember;
import com.xqt.inters.service.base.IBaseService;

import java.util.List;

/**
 * Created by Administrator on 2017/3/20.
 */
public interface ISysRoleService extends IBaseService<SysRole>{
    /**
     * 根据code查询角色
     *
     * @param code
     * @return
     */
    public SysRole queryByCode(Object code);

    /**
     * 检测角色是否存在
     */
    public int checkRoleExist(SysRole role) throws Exception;

    /**
     * 角色菜单分配保存
     *
     * @param role
     * @throws Exception
     */
    public void allotSave(SysRole role, String checkedMenu) throws Exception ;
    /**
     * 角色人员分配保存
     *
     * @param role
     * @throws Exception
     */
    public void allotMemberSave(SysRole role, String checkedMember)
            throws Exception;
    /**
     * 查询用户所拥有的权限
     *
     * @param sysRoleMember
     * @return
     */
    public List<SysRoleMember> memberRoleList(SysRoleMember sysRoleMember) ;
}
